package factory;

public class SourceInfo {
    private final String index;
    private final String type;
    private final String id;
    private final String source;

    public String getIndex() {
        return index;
    }

    public String getSource() {
        return source;
    }

    public String getType() {
        return type;
    }

    public String getId() {
        return id;
    }

    private SourceInfo(SourceBuilder builder) {
        this.index = builder.index;
        this.type = builder.type;
        this.id = builder.id;
        this.source = builder.source;
    }

    public static SourceBuilder builder() {
        return new SourceBuilder();
    }

    public static class SourceBuilder {
        private String index;
        private String type;
        private String id;
        private String source;

        public SourceBuilder() {
        }

        public SourceBuilder setIndex(String index) {
            this.index = index;
            return this;
        }

        public SourceBuilder setType(String type) {
            this.type = type;
            return this;
        }

        public SourceBuilder setId(String id) {
            this.id = id;
            return this;
        }

        public SourceBuilder setSource(String source) {
            this.source = source;
            return this;
        }

        public SourceInfo build() {
            return new SourceInfo(this);
        }

    }


}
